home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Pocket 6.3 / Extensions / Apple Events / pf.docServer < prev    next >
Text File  |  1993-06-11  |  3KB  |  62 lines

  1. Verb    pf.launch
  2. Syntax    pf.launch()
  3. Parameters    None required
  4. Action    Launch Pocket Forth.
  5. Returns    True if launch was sucessful, false otherwise.
  6. Example    pf.launch()
  7.     » true
  8. Notes    This verb uses the information in the pf.appInfo table to find and launch the Pocket Forth application. By default the program launches a program named Pocket Forth copy, to encourage you to keep an untouched copy of Pocket Forth available. The main window keeps you apprised of the action during the launch process. Most of the other verbs will call pf.launch if Pocket Forth is not running. This verb will function on an unextended copy of Pocket Forth.
  9. See Also    pf.quit
  10.  
  11. Verb    pf.load
  12. Syntax    pf.load(file)
  13. Parameters    File is any valid Frontier file description.
  14. Action    Interpret the specified file with Pocket Forth.
  15. Returns    True if the designated text file is opened by Pocket Forth, false otherwise.
  16. Example    pf.load("Hard Disk:Pocket6.3:Examples:Graphics")
  17.     » true
  18. Notes    This verb sends one of the required Apple Events (aevt,odoc) to Pocket Forth, so it functions without extending Pocket Forth.
  19.  
  20. Verb    pf.paste
  21. Syntax    pf.paste()
  22. Parameters    None required
  23. Action    Interpret the text on the clipboard with Pocket Forth.
  24. Returns    True if Pocket Forth can interpret TEXT data on the clipboard, false otherwise.
  25. Example    pf.paste()
  26.     » true
  27. Notes    This verb sends a misc,past Apple Event to Pocket Forth. If the AppleEvents file has been loaded into Pocket Forth, Pocket Forth will interpret the text as if you had pasted it in by hand.
  28.  
  29. Verb    pf.quit
  30. Syntax    pf.quit()
  31. Parameters    None required
  32. Action    Cause the Pocket Forth application to quit. Frontier's main window will display "Pocket Forth disconnected" if no error occurs.
  33. Returns    True
  34. Example    pf.quit()
  35.     » true
  36. Notes    This verb sends a aevt,quit Apple Event to Pocket Forth, causing Pocket Forth to quit, as if 'bye' had been executed. Since this is a required event, Pocket Forth responds to this verb without extention.
  37. See Also    pf.launch
  38.  
  39. Verb    pf.request
  40. Syntax    pf.request(string)
  41. Parameters    String is one of four legal data types: "short", "long", "float" and "string".
  42. Action    Pop number(s) from the data stack.
  43. Returns    A 16 bit integer, 32 bit integer, an 80 bit extended format floating point number or the string pointed to by the relative address on the stack.
  44. Example    pf.request("short")
  45.     » 42
  46. pf.request("long")
  47.     » 104378
  48. pf.request("float")
  49.     » 6.02e23
  50. pf.request("string")
  51.     » This is a test!
  52. Notes    This verb sends a misc,eval Apple Event to Pocket Forth which returns a string back to the client program (Frontier) in the reply event. If the data stack is empty, "Empty stack." is returned, if the parameter string is illegal, "Unknown type." is returned.
  53.  
  54. Verb    pf.send
  55. Syntax    pf.send(string)
  56. Parameters    string is up to 80 characters of text.
  57. Action    Interpret the string parameter with Pocket Forth. 
  58. Returns    True if Pocket Forth accepted the data, false otherwise.
  59. Example    pf.send("beep beep beep")
  60.     » true
  61. Notes    Pocket Forth will accept the string as if it had been typed in and return pressed. The input is NOT echoed to Pocket Forth's window, but any output is, including the "ok" prompt. If the text is good code, it will be interpreted in the background.
  62.